﻿<%@ Page Language="C#" MasterPageFile="~/App_MasterPages/Oceania.Master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="Blog.Net.Default" Title="Untitled Page" %>

<%@ Register TagPrefix="blg" Namespace="Blog.Net.Controls" Assembly="Blog.Net" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" runat="server">
    <asp:Repeater ID="blogEntries" DataSourceID="blogs" runat="server">
        <ItemTemplate>
            <div class="box">
                <h2>
                    <%# DataBinder.Eval(Container.DataItem, "Subject") %></h2>
                <p class="byline">
                    <small>Posted on
                        <%# DataBinder.Eval(Container.DataItem, "LongCreateDate") %></small></p>
                <p>
                    <%# DataBinder.Eval(Container.DataItem, "ShortBody") %>
                </p>
            </div>
            <blg:Rating ID="Rating1" EntryId='<%# Eval("Id") %>' runat="server" />
            <p class="links">
                <asp:HyperLink ID="HyperLink1" NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "Id","~/Blog/BlogEntry.aspx?EntryId={0}") %>'
                    CssClass="more" runat="server">Read More</asp:HyperLink>
                &nbsp;&nbsp;&nbsp;
                <asp:HyperLink ID="HyperLink2" CssClass="comments" runat="server">No Comments</asp:HyperLink></p>
            <br />
        </ItemTemplate>
    </asp:Repeater>
    <asp:ObjectDataSource ID="blogs" SelectMethod="GetLatest" DataObjectTypeName="Blog.Net.Business.BusinessObjects.BlogEntryBO"
        TypeName="Blog.Net.DataAccess.DataControls.BlogEntryDataControl" runat="server">
        <SelectParameters>
            <asp:Parameter Name="RecordCount" DefaultValue="2" />
            <asp:QueryStringParameter Name="EntryId" QueryStringField="EntryId" DefaultValue="-1" />
            <asp:QueryStringParameter Name="MonthYear" QueryStringField="Filter" DefaultValue=""
                ConvertEmptyStringToNull="true" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>
